package com.saicmotor.pay.view.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.saicmotor.pay.base.BaseActivity;
import com.saicmotor.pay.com.Constant;
import com.saicmotor.pay.databinding.LayoutPaySuccessBinding;
import com.saicmotor.pay.error.ErrorInfo;

public class PaySuccessActivity extends BaseActivity implements View.OnClickListener {
    LayoutPaySuccessBinding binding;
    private float orderAmt;

    @Override
    public void viewBinding() {
        binding = LayoutPaySuccessBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        getIntentData();
    }

    private void getIntentData() {
        Intent intent = getIntent();
        if (intent != null) {
            orderAmt = intent.getFloatExtra(Constant.PAY_ORDER_AMT, 0l);
        }
    }


    @Override
    public void initOnCreate(Bundle savedInstanceState) {
        binding.tvPaySuccess.setText(String.valueOf(orderAmt));
    }

    @Override
    public void initObservable() {

    }

    @Override
    public void onError(ErrorInfo errorInfo) {

    }

    @Override
    public void onClick(View v) {
    }
}
